﻿using System;
using SharpSqlAnalyzer.nodes;

namespace SharpSqlAnalyzer.stmt
{
	// Token: 0x0200008A RID: 138
	public class TCallStatement : TCustomSqlStatement
	{
		// Token: 0x06000384 RID: 900 RVA: 0x002F9F51 File Offset: 0x002F8151
		public TCallStatement(EDbVendor dbvendor) : base(dbvendor)
		{
			this.sqlstatementtype = ESqlStatementType.sstcall;
		}

		// Token: 0x1700005D RID: 93
		// (get) Token: 0x06000385 RID: 901 RVA: 0x002F9F62 File Offset: 0x002F8162
		// (set) Token: 0x06000386 RID: 902 RVA: 0x002F9F6A File Offset: 0x002F816A
		public virtual TExecParameterList ParameterList
		{
			get
			{
				return this.parameterList;
			}
			set
			{
				this.parameterList = value;
			}
		}

		// Token: 0x1700005E RID: 94
		// (get) Token: 0x06000387 RID: 903 RVA: 0x002F9F73 File Offset: 0x002F8173
		// (set) Token: 0x06000388 RID: 904 RVA: 0x002F9F7B File Offset: 0x002F817B
		public virtual TExpressionList Args
		{
			get
			{
				return this.args;
			}
			set
			{
				this.args = value;
			}
		}

		// Token: 0x1700005F RID: 95
		// (get) Token: 0x06000389 RID: 905 RVA: 0x002F9F84 File Offset: 0x002F8184
		// (set) Token: 0x0600038A RID: 906 RVA: 0x002F9F8C File Offset: 0x002F818C
		public virtual TObjectName HostVariable
		{
			get
			{
				return this.hostVariable;
			}
			set
			{
				this.hostVariable = value;
			}
		}

		// Token: 0x17000060 RID: 96
		// (get) Token: 0x0600038B RID: 907 RVA: 0x002F9F95 File Offset: 0x002F8195
		// (set) Token: 0x0600038C RID: 908 RVA: 0x002F9F9D File Offset: 0x002F819D
		public virtual TObjectName IndicatorVariable
		{
			get
			{
				return this.indicatorVariable;
			}
			set
			{
				this.indicatorVariable = value;
			}
		}

		// Token: 0x17000061 RID: 97
		// (get) Token: 0x0600038D RID: 909 RVA: 0x002F9FA6 File Offset: 0x002F81A6
		// (set) Token: 0x0600038E RID: 910 RVA: 0x002F9FAE File Offset: 0x002F81AE
		public virtual TObjectName RoutineName
		{
			get
			{
				return this.routineName;
			}
			set
			{
				this.routineName = value;
			}
		}

		// Token: 0x17000062 RID: 98
		// (get) Token: 0x0600038F RID: 911 RVA: 0x002F9FB7 File Offset: 0x002F81B7
		// (set) Token: 0x06000390 RID: 912 RVA: 0x002F9FBF File Offset: 0x002F81BF
		public virtual TExpression RoutineExpr
		{
			get
			{
				return this.routineExpr;
			}
			set
			{
				this.routineExpr = value;
			}
		}

		// Token: 0x06000391 RID: 913 RVA: 0x002F9FC8 File Offset: 0x002F81C8
		public override int doParseStatement(TCustomSqlStatement psql)
		{
			if (this.rootNode == null)
			{
				return -1;
			}
			base.doParseStatement(psql);
			TCallSqlNode tcallSqlNode = (TCallSqlNode)this.rootNode;
			this.routineExpr = tcallSqlNode.RoutineExpr;
			this.args = tcallSqlNode.Args;
			this.routineName = tcallSqlNode.RoutineName;
			this.indicatorVariable = tcallSqlNode.IndicatorVariable;
			this.hostVariable = tcallSqlNode.HostVariable;
			this.parameterList = tcallSqlNode.ParameterList;
			return 0;
		}

		// Token: 0x06000392 RID: 914 RVA: 0x002FA03C File Offset: 0x002F823C
		public override void accept(TParseTreeVisitor v)
		{
			v.preVisit(this);
			v.postVisit(this);
		}

		// Token: 0x06000393 RID: 915 RVA: 0x002FA04C File Offset: 0x002F824C
		public override void acceptChildren(TParseTreeVisitor v)
		{
			v.preVisit(this);
			v.postVisit(this);
		}

		// Token: 0x040010B2 RID: 4274
		private TObjectName routineName;

		// Token: 0x040010B3 RID: 4275
		private TObjectName hostVariable;

		// Token: 0x040010B4 RID: 4276
		private TObjectName indicatorVariable;

		// Token: 0x040010B5 RID: 4277
		private TExpressionList args;

		// Token: 0x040010B6 RID: 4278
		private TExpression routineExpr;

		// Token: 0x040010B7 RID: 4279
		private TExecParameterList parameterList;
	}
}
